package bean;

import java.io.Serializable;

/**
 * message
 * 
 * @author
 */
public class Message implements Serializable {
	private Integer messageid;

	private Integer messagesenderid;

	private Integer messagereceiverid;

	private Integer messagetype;

	private String messagecontent;

	private String messagetime;

	private Integer messageifread;

	private String a;

	private String b;

	private String c;

	private static final long serialVersionUID = 1L;

	public Integer getMessageid() {
		return messageid;
	}

	public void setMessageid(Integer messageid) {
		this.messageid = messageid;
	}

	public Integer getMessagesenderid() {
		return messagesenderid;
	}

	public void setMessagesenderid(Integer messagesenderid) {
		this.messagesenderid = messagesenderid;
	}

	public Integer getMessagereceiverid() {
		return messagereceiverid;
	}

	public void setMessagereceiverid(Integer messagereceiverid) {
		this.messagereceiverid = messagereceiverid;
	}

	public Integer getMessagetype() {
		return messagetype;
	}

	public void setMessagetype(Integer messagetype) {
		this.messagetype = messagetype;
	}

	public String getMessagecontent() {
		return messagecontent;
	}

	public void setMessagecontent(String messagecontent) {
		this.messagecontent = messagecontent;
	}

	public String getMessagetime() {
		return messagetime;
	}

	public void setMessagetime(String messagetime) {
		this.messagetime = messagetime;
	}

	public Integer getMessageifread() {
		return messageifread;
	}

	public void setMessageifread(Integer messageifread) {
		this.messageifread = messageifread;
	}

	public String getA() {
		return a;
	}

	public void setA(String a) {
		this.a = a;
	}

	public String getB() {
		return b;
	}

	public void setB(String b) {
		this.b = b;
	}

	public String getC() {
		return c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		Message other = (Message) that;
		return (this.getMessageid() == null ? other.getMessageid() == null
				: this.getMessageid().equals(other.getMessageid()))
				&& (this.getMessagesenderid() == null ? other.getMessagesenderid() == null
						: this.getMessagesenderid().equals(other.getMessagesenderid()))
				&& (this.getMessagereceiverid() == null ? other.getMessagereceiverid() == null
						: this.getMessagereceiverid().equals(other.getMessagereceiverid()))
				&& (this.getMessagetype() == null ? other.getMessagetype() == null
						: this.getMessagetype().equals(other.getMessagetype()))
				&& (this.getMessagecontent() == null ? other.getMessagecontent() == null
						: this.getMessagecontent().equals(other.getMessagecontent()))
				&& (this.getMessagetime() == null ? other.getMessagetime() == null
						: this.getMessagetime().equals(other.getMessagetime()))
				&& (this.getMessageifread() == null ? other.getMessageifread() == null
						: this.getMessageifread().equals(other.getMessageifread()))
				&& (this.getA() == null ? other.getA() == null : this.getA().equals(other.getA()))
				&& (this.getB() == null ? other.getB() == null : this.getB().equals(other.getB()))
				&& (this.getC() == null ? other.getC() == null : this.getC().equals(other.getC()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getMessageid() == null) ? 0 : getMessageid().hashCode());
		result = prime * result + ((getMessagesenderid() == null) ? 0 : getMessagesenderid().hashCode());
		result = prime * result + ((getMessagereceiverid() == null) ? 0 : getMessagereceiverid().hashCode());
		result = prime * result + ((getMessagetype() == null) ? 0 : getMessagetype().hashCode());
		result = prime * result + ((getMessagecontent() == null) ? 0 : getMessagecontent().hashCode());
		result = prime * result + ((getMessagetime() == null) ? 0 : getMessagetime().hashCode());
		result = prime * result + ((getMessageifread() == null) ? 0 : getMessageifread().hashCode());
		result = prime * result + ((getA() == null) ? 0 : getA().hashCode());
		result = prime * result + ((getB() == null) ? 0 : getB().hashCode());
		result = prime * result + ((getC() == null) ? 0 : getC().hashCode());
		return result;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(getClass().getSimpleName());
		sb.append(" [");
		sb.append("Hash = ").append(hashCode());
		sb.append(", messageid=").append(messageid);
		sb.append(", messagesenderid=").append(messagesenderid);
		sb.append(", messagereceiverid=").append(messagereceiverid);
		sb.append(", messagetype=").append(messagetype);
		sb.append(", messagecontent=").append(messagecontent);
		sb.append(", messagetime=").append(messagetime);
		sb.append(", messageifread=").append(messageifread);
		sb.append(", a=").append(a);
		sb.append(", b=").append(b);
		sb.append(", c=").append(c);
		sb.append(", serialVersionUID=").append(serialVersionUID);
		sb.append("]");
		return sb.toString();
	}
}